library(ggplot2)
library(rjson)
library(rvest)
## Loading required package: xml2
library(stringr)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
df<-
df %>%
mutate(positionTS=str_replace(positionTS,'"positionTS":',"")) %>%
mutate(positionTS=str_replace(positionTS,',',""))
z<-as.numeric(df[,"positionTS"])
z<-as.POSIXct((z+0.1)/1000, origin = "1970-01-01")
df[,"positionTS"]<-z
df<-
df %>%
janitor::clean_names()
range(df$position_ts)
## [1] "2017-01-24 10:49:15 EST" "2017-01-24 11:08:16 EST"
tbl_freq_detected=df %>%
group_by(id,name) %>%
summarize(n=n())
tbl_freq_detected
## # A tibble: 26 x 3
## # Groups: id [?]
## id name n
## <fct> <fct> <int>
## 1 b4994c876dbb 024 res 172
## 2 b4994c876dcb 002 dev 5417
## 3 b4994c876de6 019 res 5439
## 4 b4994c877897 003 dev 5359
## 5 b4994c877aa1 005 dev 5456
## 6 b4994c877cb8 006 dev 5508
## 7 b4994c877d82 021 res 295
## 8 b4994c877eca 007 dev 3874
## 9 b4994c877ee8 012 pub 5468
## 10 b4994c877fa2 017 res 5474
## # ... with 16 more rows